<%--
  Created by IntelliJ IDEA.
  User: qjqe@outlook.com
  Date: 2020/4/6
  Time: 16:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="include/headerLogin.jsp"%>
<head>
    <style type="text/css">
        /*
 * Base structure
 */

        /* Move down content because we have a fixed navbar that is 50px tall */
        body {
            padding-top: 50px;
        }


        /*
         * Global add-ons
         */

        .sub-header {
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }

        /*
         * Top navigation
         * Hide default border to remove 1px line.
         */
        .navbar-fixed-top {
            border: 0;
        }

        /*
         * Sidebar
         */

        /* Hide for mobile, show later */
        .sidebar {
            display: none;
        }
        @media (min-width: 768px) {
            .sidebar {
                position: fixed;
                top: 51px;
                bottom: 0;
                left: 0;
                z-index: 1000;
                display: block;
                padding: 20px;
                overflow-x: hidden;
                overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
                background-color: #f5f5f5;
                border-right: 1px solid #eee;
            }
        }

        /* Sidebar navigation */
        .nav-sidebar {
            margin-right: -21px; /* 20px padding + 1px border */
            margin-bottom: 20px;
            margin-left: -20px;
        }
        .nav-sidebar > li > a {
            padding-right: 20px;
            padding-left: 20px;
        }
        .nav-sidebar > .active > a,
        .nav-sidebar > .active > a:hover,
        .nav-sidebar > .active > a:focus {
            color: #fff;
            background-color: #428bca;
        }


        /*
         * Main content
         */

        .main {
            padding: 20px;
        }
        @media (min-width: 768px) {
            .main {
                padding-right: 40px;
                padding-left: 40px;
            }
        }
        .main .page-header {
            margin-top: 0;
        }


        /*
         * Placeholder dashboard ideas
         */

        .placeholders {
            margin-bottom: 30px;
            text-align: center;
        }
        .placeholders h4 {
            margin-bottom: 0;
        }
        .placeholder {
            margin-bottom: 20px;
        }
        .placeholder img {
            display: inline-block;
            border-radius: 50%;
        }

    </style>
    <script>
        window.onload = function () {
            //方法内容
            $("#googslist").addClass("active");
        }
        if(window.name != "off"){

                var html = $(this).text();
                //获取对应的页面元素
                $.ajax({
                    url: "/sss/goods/goodsmanage",
                    type: "get",
                    data: null,
                    contentType: "text/html;charset=UTF-8",
                    success: function (data) {
                        $(".main").html(data);
                    },
                    error: function () {
                    }
                });
            //活动效果
            $("#googslist").addClass("active");
        }
        $(function () {
            $("#admin").click(function () {
                var html = $(this).text();
                //活动效果
                $("#googslist").removeClass("active");
                $("#admin").addClass("active");
                //获取对应的页面元素
                $.ajax({
                    url: "/sss/admin/control",
                    type: "get",
                    data: null,
                    contentType: "text/html;charset=UTF-8",
                    success: function (data) {
                        $(".main").html(data);
                    },
                    error: function () {

                    }
                });
            });
            $("#googslist").click(function () {
                var html = $(this).text();

                //活动效果
                $("#admin").removeClass("active");
                $("#googslist").addClass("active");
                //获取对应的页面元素
                $.ajax({
                    url: "/sss/goods/goodsmanage",
                    type: "get",
                    data: null,
                    contentType: "text/html;charset=UTF-8",
                    success: function (data) {
                        $(".main").html(data);
                    },
                    error: function () {
                    }
                });
            });

        });


    </script>
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="nav-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">

                </button>
                <a class="navbar-brand" href="#">sss物品管理系统</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class=" nav navbar-nav navbar-right">
                    <li>
                        <a href="/sss/admin/account/logout">注销</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-3 col-md-2 sidebar">
                <ul class="nav nav-sidebar">
                    <li  id="googslist"><a href="#">物品管理<span class="sr-only">(current)</span></a></li>
                    <li id="admin"><a  >管理员信息</a></li>
                </ul>
            </div>
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">

            </div>
        </div>
    </div>

</body>
<%@include file="include/footer.jsp"%>

